package csu.web.mypetstore.service;

import csu.web.mypetstore.persistence.CartDao;
import csu.web.mypetstore.persistence.impl.CartDaoImpl;

import java.util.List;

public class CartService {
    private CartDao cartDao;

    public List<String> getItemByUsername(String username) {
        cartDao = new CartDaoImpl();
        return cartDao.getItemByUsername(username);
    }

    public void insertItem(String username,String item) {
        cartDao = new CartDaoImpl();
        cartDao.insertItem(username,item);
    }

    public void removeItem(String username,String item) {
        cartDao = new CartDaoImpl();
        cartDao.removeItem(username,item);
    }
}
